﻿<%@ Page Title="" Language="C#" MasterPageFile="~/glymb.Master" AutoEventWireup="true" CodeBehind="glyh.aspx.cs" Inherits="ShoppingWebSite.glyh" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="css/ShopSite.css" rel="stylesheet" />
     <style>
         #Content{
            width:500px;
            margin:0px auto;
            padding-bottom:30px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="Content">
        
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="UId" DataSourceID="SqlDataSource1" >
            <Columns>
                <asp:BoundField DataField="UId" HeaderText="UId" InsertVisible="False" ReadOnly="True" SortExpression="UId" />
                <asp:BoundField DataField="UName" HeaderText="UName" SortExpression="UName" />
                <asp:BoundField DataField="UPwd" HeaderText="UPwd" SortExpression="UPwd" />
                <asp:BoundField DataField="URealName" HeaderText="URealName" SortExpression="URealName" />
                <asp:BoundField DataField="UTel" HeaderText="UTel" SortExpression="UTel" />
                <asp:CommandField ShowEditButton="True" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
        
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ShoppingDBConnectionString5 %>" DeleteCommand="DELETE FROM [UserName] WHERE [UId] = @UId" InsertCommand="INSERT INTO [UserName] ([UName], [UPwd], [URealName], [UTel]) VALUES (@UName, @UPwd, @URealName, @UTel)" SelectCommand="SELECT * FROM [UserName]" UpdateCommand="UPDATE [UserName] SET [UName] = @UName, [UPwd] = @UPwd, [URealName] = @URealName, [UTel] = @UTel WHERE [UId] = @UId">
            <DeleteParameters>
                <asp:Parameter Name="UId" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="UName" Type="String" />
                <asp:Parameter Name="UPwd" Type="String" />
                <asp:Parameter Name="URealName" Type="String" />
                <asp:Parameter Name="UTel" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="UName" Type="String" />
                <asp:Parameter Name="UPwd" Type="String" />
                <asp:Parameter Name="URealName" Type="String" />
                <asp:Parameter Name="UTel" Type="String" />
                <asp:Parameter Name="UId" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        
    </div>
</asp:Content>
